<template>
    <div class="six" id="six"></div>
</template>

<script>
export default {
  mounted () {
    this.initChart()
  },
  methods: {
    initChart () {
      const six = this.$echarts.init(document.getElementById('six'));
      const option = {
        xAxis: {
          max: 'dataMax',
          splitLine: {
            show: false
          }
        },
        yAxis: {
          type: 'category',
          data: ['科技', '金融', '制造', '零售', '教育', '医疗']
        },
        series: [
          {
            realtimeSort: true,
            type: 'bar',
            data: [1, 2, 10, 4, 5, 6],
            label: {
              position: 'right',
              valueAnimation: true
            }
          }
        ],
        tooltip: {}
      };

      six.setOption(option);
    }
  }
}
</script>

<style>
.six {
    width: 495px;
    height: 352px;
}
</style>